home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %daycolor_a )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
- pshader("
-
- ps_1_4
-
- texld r0, t0 ;RGB=terrain colormap, A=terrain lightmap
- texld r1, t1 ;details
- texld r2, t2 ;world cubemap
- texld r3, t3 ;detailmasks
- texld r4, t4 ;clouds
-
-
-
- dp3 r1.rgb, r1, r3 ;Mul details with masks = DETAILS
- +mul r1.a, 1-r4.a, r0.a ;clouds shadow * terrain lightmap = CLOUDS&LIGHTMAP
-
- mad r0.rgb, r2, r3.a, r0 ;cut cubemap with mask & add SPECCOLOR = COLOR&ENV
- +mad_sat r1.a, r1.a, c7.b, c7.a ;ambient + CLOUDS&LIGHTMAP = LIGHTING
-
- mul r0.rgb, r0, c5 ;COLOR&ENV * light color = TERRAINDAY
- +mul r0.a, r1.a, r1.b ;mul ALL_DETAILS and LIGHTING = LIGHT&DETAILS
-
- ;mul r0, r0, r0.a ;TERRAINDAY * LIGHT&DETAILS = ALL
-
- ; hack for gffx 5900u
- mov r1, r0
- mul r0, r1, r0.a ;TERRAINDAY * LIGHT&DETAILS = ALL
-
- ")
-
-